home *** CD-ROM | disk | FTP | other *** search
- > When you want to copy two arrays use the following:
- >
- > Dim a(n),b(n)
- > Copy Varptr(a(0)),Varptr(a(0))+n*4 to varptr(b(0))
- >
- > Try it.It's ultra fast.Try to compare it with:
- > For x=1 to n
- > b(x)=a(x)
- > Next
- >
- > When you want to initialize an array just use:
- > Fill varptr(a(0)) to varptr(a(0))+n*4,0 ; fill it with 0
- >
- > You will notice the difference!
- >
- > Also deek(varptr(a(0))-4) gives N!
- > Gregory.
-
- However, don't do this if your arrays contain more than 65535 elements in
- total, as then AMOS doesn't always store them in continous memory addresses.
-
- Also, you might have trouble doing this with string arrays, as AMOS will lose
- pointers to its strings, or gain duplicate pointers it doesn't know about.
-
-
- +-------------------------+------------------------------------+
- | | _____ |
- | PAUL HICKMAN | / \ ON A HOT SUMMER NIGHT |
- | (ph@doc.ic.ac.uk) | / O O \ WOULD YOU OFFER YOUR |
- | DEPARTMENT OF COMPUTING | | _ | THROAT TO THE WOLF |
- | IMPERIAL COLLEGE LONDON | \ / \ / WITH THE RED ROSES ? |
- | | \_____/ |
- +-------------------------+------------------------------------+
- Machines: Amiga 500 WB1.3 - 1mb Memory - External Disk Drive.
- Amiga 1200 WB3.0 - 6mb Memory - 200Mb Hard Disk.
-
-
-